import Vue from "vue"
import VueRouter from "vue-router"
Vue.use(VueRouter)

const routes = [
    {
        path: '/login',
        component: () => import("@/views/login"),
    },
    {
        name: 'index',
        path: '/',
        redirect: '/junior',
        component: () => import("@/views/index"),
        children: [
            {
                path: '/primary/1',
                redirect: '/primary/1/1',
            },
            {
                name: 'primary_1_1',
                path: '/primary/1/1',
                component: () => import("@/views/primary/1/1"),
                meta: {
                    title: '小学一年级1班',
                },
            },
            {
                name: 'primary_1_2',
                path: '/primary/1/2',
                component: () => import("@/views/primary/1/2"),
                meta: {
                    title: '小学一年级2班',
                },
            },
            {
                name: 'primary_2',
                path: '/primary/2',
                component: () => import("@/views/primary/2"),
                meta: {
                    title: '小学二年级',
                },
            },
            {
                name: 'junior',
                path: '/junior',
                component: () => import("@/views/junior"),
                meta: {
                    title: '初中',
                },
            },
        ]
    },
]
export default new VueRouter({
    routes: routes,
    mode: 'history',
})